<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>我的地址电话</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	
	
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	
	
	
    <link href='https://fonts.googleapis.com/css?family=Titillium+Web:400,200,300,700,600' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Roboto+Condensed:400,700,300' rel='stylesheet' type='text/css'>
    <link href='https://fonts.googleapis.com/css?family=Raleway:400,100' rel='stylesheet' type='text/css'>
    
    <!-- Bootstrap -->
    <link rel="stylesheet" href="PAGE/css/bootstrap.min.css">
    
    <!-- Font Awesome -->
    <link rel="stylesheet" href="PAGE/css/font-awesome.min.css">
    
    <!-- Custom CSS -->
    <link rel="stylesheet" href="PAGE/css/owl.carousel.css">
    <link rel="stylesheet" href="PAGE/style.css">
    <link rel="stylesheet" href="PAGE/css/responsive.css">

  </head>
  
  <body>
     <div class="header-area">
        <div class="container">
            <div class="row">
                <div class="col-md-8">
                    <div class="user-menu">
                        <ul>
                            <li><a href="UserAndOrder/userDetail.jsp"><i class="fa fa-user"></i> 我的账户</a></li>
                          <!--   <li><a href="#"><i class="fa fa-heart"></i>心愿单</a></li> -->
                            <li><a href="/eshop/PAGE/cart.jsp"><i class="fa fa-user"></i>购物车</a></li>
                            <li><a href="/eshop/PAGE/checkout.jsp"checkout.html"><i class="fa fa-user"></i> 结算</a></li>
                              <c:choose>
                            	<c:when test="${sessionScope.user.usersId eq null}">
                            	<li><a href="UserAndOrder/login.jsp"><i class="fa fa-user">用户登录</i>
                            	
                            	</c:when>
                            	<c:otherwise>
                            	<li><a href="UserAndOrder/userDetail.jsp"><i class="fa fa-user">${sessionScope.user.usersNickname}</i>
                            	
                            	</c:otherwise>
                            </c:choose>
                        </ul>
                    </div>
                </div>
                
                <div class="col-md-4">
                    <div class="header-right">
                        <ul class="list-unstyled list-inline">
                            <li class="dropdown dropdown-small">
                                <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" href="#"><span class="key">货币 :</span><span class="value">人民币 </span><b class="caret"></b></a>

                            </li>

                            <li class="dropdown dropdown-small">
                                <a data-toggle="dropdown" data-hover="dropdown" class="dropdown-toggle" href="#"><span class="key">语言:</span><span class="value">简体中文</span><b class="caret"></b></a>
                                <ul class="dropdown-menu">

                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div> <!-- End header area -->

    <div class="logo">
                        <div style="text-align: center;">
                          
                            	<a href="/eshop/PAGE/InterFace.jsp"><img src="PAGE/img/logo.png"   ></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                      			
                      		      	
                          
                        </div>
                    </div>
	<!-- 地址电话 -->
    <table cellspacing="0" class="shop_table cart">
    	<tr>
    		<td colspan="4" align="center"><h3 style="color:blue">收货地址和电话<h3/></td> 		
    	</tr>
    	<tr>
    		<!--<td width="20%">地址编号</td> -->
    		<td width="10%">序号</td> 
    		<td width="50%">地址信息</td> 
    		<td width="20%">联系电话</td> 
    		<td width="20%">处理</td>
    	</tr>
    	
		<c:forEach items="${AddressList}" var="address" varStatus="count">
			<c:if test="${address.addressExist == 1}">
				<tr>
		    		 <!-- <td>${address.addressId }</td> -->
		    		<%--<td>No.${count.index }</td>--%>
		    		<td>No.${count.count }</td>
		    		<td>${address.addressRoute }</td> 
		    		<td>${address.connectTel}</td> 
		    		<td><a href="AddressServlet?type=delete&addressid=${address.addressId}">删除</a></td>	
		    	</tr>
			</c:if>
    	</c:forEach>
    	
    </table>
     <!-- 添加地址电话 -->
    <form action="AddressServlet" method="post">
    	<table class="shop_table cart">
    		<tr>
    			<td>添加地址</td>
    			<td><input type="text" name="address" size="90%	"></td>
    	
    			
    			<input type="hidden" value="add" name="type">
    		</tr>
    		<tr>
    			<td>添加电话</td>
    			<td><input type="text" name="tel"  size="90%"></td>		
    		</tr>
    		<tr>
				<td colspan="2" align="center"><input type="submit" value="添加"></td>
    		</tr>
    	</table>
    </form>
    <!-- 添加地址电话 -->  
    
    
    <!-- Latest jQuery form server -->
    <script src="https://code.jquery.com/jquery.min.js"></script>
    
    <!-- Bootstrap JS form CDN -->
    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
    
    <!-- jQuery sticky menu -->
    <script src="PAGE/js/owl.carousel.min.js"></script>
    <script src="PAGE/js/jquery.sticky.js"></script>
    
    <!-- jQuery easing -->
    <script src="PAGE/js/jquery.easing.1.3.min.js"></script>
    
    <!-- Main Script -->
    <script src="PAGE/js/main.js"></script>
    
    <!-- Slider -->
    <script type="text/javascript" src="PAGE/js/bxslider.min.js"></script>
	<script type="text/javascript" src="PAGE/js/script.slider.js"></script>
  </body>
</html>
